package com.aho.app.util;

import android.view.animation.Interpolator;

public abstract class AbstractAnimation {
	protected int mDuration;
	protected Interpolator mInterpolator;
	protected long mStartTimestamp;
	protected boolean mPlaying;
	protected boolean mReverse;
	
	public AbstractAnimation(int duration, Interpolator interpolator) {
		mDuration = duration;
		mInterpolator = interpolator;
		mPlaying = false;
		mReverse = false;
	}
	
	public void start() {
		mStartTimestamp = System.currentTimeMillis();
		mReverse = false;
		mPlaying = true;
	}
	
	public void reverse() {
		mStartTimestamp = System.currentTimeMillis();
		mReverse =  true;
		mPlaying = true;
	}
	
	public boolean isPlaying() {
		return mPlaying;
	}
}
